import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 注册图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 导入构造函数
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
 // 实例化 Pinia
 const pinia = createPinia()

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
pinia.use(piniaPluginPersist)
app.use(pinia)

app.use(router).use(ElementPlus).mount('#app')
